import { BaseMap } from "./BaseMap";
import { IBSess } from "../../../common/interfaces";
import { MapEntity } from "./MapEntity";
import { MsgVo } from "../../../config/Msg";

/**
 * 地图中的玩家
 */
export class MapPlayer extends MapEntity {

    pid: number;
    sid: number;
    frontSid: string;
    name: string;
    career: number;
    createTime: number;
    spd = 25;
    ang = 0;
    map: BaseMap;
    /** 客户端同步过来的 */
    sync: MsgVo.com.tos_syncPlayer


    constructor(sess: IBSess, p: any) {
        super();
        this.x = 0;
        this.y = 0;
        this.frontSid = sess.sid;
        this.pid = p.pid;
        this.sid = p.sid;
        this.name = p.name;
        this.career = p.career;
        this.createTime = p.createTime;
    }
}